<template>
    <div>
        <div class="banner">
          

            <van-swipe @change="onChange"  class="my-swipe" :autoplay="1000" indicator-color="white">
  <van-swipe-item>
    <img src="../assets/img/广澳.jpg" alt="">
  </van-swipe-item>
  <van-swipe-item>
    <img src="../assets/img/轮播1.jpg" alt="">
  </van-swipe-item>
  <van-swipe-item>
    <img src="../assets/img/轮播3.jpg" alt="">
  </van-swipe-item>
  <template #indicator>
    <ol>
            <li :class="{'con':indexSwiper==0}"></li>
            <li :class="{'con':indexSwiper==1}"></li>
            <li :class="{'con':indexSwiper==2}"></li>
           </ol>
  </template>
</van-swipe>
        </div>
    </div>
</template>

<script>
    export default {
        data(){
          return{
            indexSwiper:0,
          };
        },
        methods:{
          onChange(index){
            this.indexSwiper = index;
          }
        }
    }
</script>

<style lang="scss" scoped>
img {
  width: 100%;
  height: 120px;
}
  .banner {
    // margin-top:10px;
    position: relative;
    background-color: #ffffff;

    ol {
      position: absolute;
      bottom: 11px;
      display: flex;
      right: 12px;
      li {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background-color: #aca27a;
        margin-right: 2px;
      }
      .con {
        background-color: #ff8800;
      }
    }
  }

  .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    // line-height: 150px;
    text-align: center;
    // background-color: #39a9ed;
  }

  .custom-indicator {
    position: absolute;
    right: 5px;
    bottom: 5px;
    padding: 2px 5px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.1);
  }
</style>